package tpo.lmhprovider.lmhprovider.dao;

import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import pojo.Specs;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface SpecsMapper {

    List<Specs> getSpecs(Map map);

    @Update("update specs set spId=#{spId},level=#{level},name=#{name} where id=#{id}")
    int updateSpecs(Map map);

    @Insert("insert into specs (spId,level,name,isFlag) values(#{spId},#{level},#{name},0)")
    int addSpecs (Map map);

    @Update("update specs set isFlag=1 where id=#{id}")
    int delSpecs(Map map);


    int addWa_Sp (@Param("wa_spList")List wa_spList);

    @Update("update wa_sp set isFlag=1 where waresId=#{waresId}")
    int delWa_Sp(@Param("id")int waresId);
}
